#ifndef RENDER_GLOBALS_H_INCLUDED
#define RENDER_GLOBALS_H_INCLUDED

#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>

#include <SDL/SDL_gfxPrimitives.h>
#include "../html_parser/html_globals.h"
#include "../html_parser/html_parser.h"

#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define BITDEPTH 24

extern char* make_path(const char*);
extern SDL_Surface*    screen;


// Aliginment
enum _align {
    AL_LEFT = 0,
    AL_RIGHT,
    AL_CENTER
};

enum _sizes {
    SZ_H1 = 30,
    SZ_H2 = 22,
    SZ_H3 = 16,
    SZ_NORMAL = 12,
    SZ_H4 = 12,
    SZ_H5 = 10,
    SZ_H6 = 8
};

// render rect ... bounding box
struct r_rect {
    int             x;
    int             y;
    int             w;
    int             h;
};

struct _render_attribs
{
    _render_attribs()
    {
        memset(this,0,sizeof(_render_attribs));
        r_bgcolor = 0xffffff;
        r_alink = 0x0000ff;
    }
    bool            r_preformatted;
    int             r_fontsize;
    int             r_align;
    int             r_fontweight;
    char*           r_src;
    int             r_width;
    int             r_height;
    unsigned long   r_color;
    unsigned long   r_bgcolor;
    SDL_Rect        r_padding;
    unsigned long   r_alink;
    SDL_Surface*    r_background;

    // current tag
    unsigned long   r_ctag;

};

#include "fonts.h"
#include "textures.h" // for loading images
#endif // RENDER_GLOBALS_H_INCLUDED
